﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SkyFab.Master" AutoEventWireup="true" CodeBehind="CheckPurchaseHistory.aspx.cs" Inherits="Web.CheckPurchaseHistory" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            height: 10px;
        }
        .style2
        {
            height: 21px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:Label ID="FlashMessageLabel" runat="server"></asp:Label>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<h1>Check Purchase History</h1>

    <div class="span-18">
    <fieldset>
    <legend>Search Vendor PO</legend>

    <p>
    <label>Search By Product No.:</label>
    <asp:TextBox ID="ProductNoTextBox" runat="server" CssClass="text" Width="370"></asp:TextBox>
    </p>
    <p>
    <label>Search By PO No.:</label>
    <asp:TextBox ID="PONoTextBox" runat="server" CssClass="text" Width="220"></asp:TextBox>
    <asp:DropDownList ID="VendorDropDownList" runat="server" Width="150"></asp:DropDownList>
    
    </p>

    <p>
    <label>Or Search By Time: From </label>
    <asp:TextBox ID="FromTextBox" runat="server" CssClass="text" Width="150"></asp:TextBox>
                <asp:CalendarExtender ID="FromTextBox_CalendarExtender" runat="server" 
                    Enabled="True" TargetControlID="FromTextBox" Format="d MMM, yyyy">
                </asp:CalendarExtender>
    <label>To </label>
    <asp:TextBox ID="ToTextBox" runat="server" CssClass="text" Width="150"></asp:TextBox>
                <asp:CalendarExtender ID="ToTextBox_CalendarExtender" runat="server" 
                    Enabled="True" TargetControlID="ToTextBox" Format="d MMM, yyyy">
                </asp:CalendarExtender>
   <asp:Button ID="SearchButton" runat="server" onclick="SearchButton_Click" Text="Search" CssClass="submitButton" />
    </p>

    <p>
    <asp:Button ID="ShowLateButton" runat="server" onclick="ShowLateButton_Click" Text="Show Late Record" CssClass="submitButton" />
    </p>
    </fieldset>
    </div>
   
   <div class="span-18">
   <h3>Search Result:</h3>
   <p>
   <asp:GridView ID="PurchaseHistoryGridview" runat="server" AllowPaging="True" 
                    CellPadding="4" GridLines="None" 
                    onpageindexchanging="PurchaseHistoryGridview_PageIndexChanging" 
                    AutoGenerateColumns="False" CssClass="gridview" Width="100%">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:TemplateField HeaderText="PO No.">
                            <ItemTemplate>
                                <asp:HyperLink ID="PONoHyperLink" runat="server" NavigateUrl='<%# "VendorPODetail.aspx?vendPOid="+Eval("VendPOId") %>'><%# Eval("PONo")%></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ProductNo" HeaderText="No" />
                        <asp:BoundField DataField="OrderQty" HeaderText="Order QTY" />
                        <asp:BoundField DataField="CompleteQty" HeaderText="Complete QTY" />
                        <asp:BoundField DataField="VendorName" HeaderText="Vendor" />
                        <asp:BoundField DataField="RequestDate" HeaderText="Request" />
                        <asp:BoundField DataField="CompleteDate" HeaderText="Complete" />
                        <asp:BoundField DataField="Status" HeaderText="Status" />
                    </Columns>
                    
                    <AlternatingRowStyle BackColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle HorizontalAlign="Center" CssClass="pagerTable" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
   </p>
   </div>
                

</asp:Content>
